home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / 335_03.zip / ASZ80.TXT < prev    next >
Text File  |  1993-04-01  |  25KB  |  859 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        A.  Appendix_for_asz80_Frankenstein_Assembler
  9.  
  10.        A.1  Pseudo_Operations
  11.  
  12.        A.1.1  Standard_Pseudo_Operation_Mnemonics
  13.  
  14.             End                                END
  15.             File Inclusion                     INCL INCLUDE
  16.             If                                 IF
  17.             Else                               ELSE
  18.             End If                             ENDI
  19.             Equate                             EQU
  20.             Set                                SETEQU
  21.             Org                                ORG
  22.             Reserve Memory                     RESERVE RMB
  23.             Define Byte Data                   BYTE DB FCB
  24.             Define Word Data                   DW FDB WORD
  25.             Define String Data                 FCC STRING
  26.             Define Character Set Translation   CHARSET
  27.             Define Character Value             CHARDEF CHD
  28.             Use Character Translation          CHARUSE
  29.  
  30.        A.1.2  Machine_Dependent_Pseudo_Operations
  31.  
  32.        A.1.2.1  Instruction_Set_Selection
  33.  
  34.             CPU string
  35.  
  36.        The instruction set can be specified in the source file with
  37.        the CPU pseudooperation.  The string, delimited by quotes or
  38.        apostrophes, is scanned for a substring which selects which
  39.        instruction set is used.  When the program is invoked, this
  40.        operation is performed on the name of the program, then the
  41.        -p optional arguement, if any, and then any CPU statements.
  42.        The last one selects the which subset of the instructions
  43.        the assembler will accept.  The instruction set can be
  44.        changed at any place in the source file.
  45.  
  46.             Instruction Set          Substrings
  47.             64180                    180
  48.             z80                      z80 Z80
  49.             8085                     85
  50.             8080                     80
  51.  
  52.        A.2  Instructions
  53.  
  54.        A.2.1  Instruction_List
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        Opcode   Syntax                       Selection Criteria
  75.  
  76.  
  77.        ADC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRBC
  78.        ADC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRDE
  79.        ADC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRHL
  80.        ADC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRSP
  81.        ADC       reg8 ',' '(' DREGHL ')'     REGISA
  82.        ADC       reg8 ',' index              TSZ80PLUS|DRIX|REGISA
  83.        ADC       reg8 ',' index              TSZ80PLUS|DRIY|REGISA
  84.        ADC       reg8 ',' reg8               0|REGISA
  85.        ADC       reg8 ',' topexpr            REGISA
  86.  
  87.        ADD       dreg ',' dreg               DRDESTHL|DRBC
  88.        ADD       dreg ',' dreg               DRDESTHL|DRDE
  89.        ADD       dreg ',' dreg               DRDESTHL|DRHL
  90.        ADD       dreg ',' dreg               DRDESTHL|DRSP
  91.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIX|DRBC
  92.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIX|DRDE
  93.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIX|DRIX
  94.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIX|DRSP
  95.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIY|DRBC
  96.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIY|DRDE
  97.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIY|DRIY
  98.        ADD       dreg ',' dreg               TSZ80PLUS|DRDESTIY|DRSP
  99.        ADD       reg8 ',' '(' DREGHL ')'     REGISA
  100.        ADD       reg8 ',' index              TSZ80PLUS|DRIX|REGISA
  101.        ADD       reg8 ',' index              TSZ80PLUS|DRIY|REGISA
  102.        ADD       reg8 ',' reg8               0|REGISA
  103.        ADD       reg8 ',' topexpr            REGISA
  104.  
  105.        AND       '(' DREGHL ')'
  106.        AND       index                       TSZ80PLUS|DRIX
  107.        AND       index                       TSZ80PLUS|DRIY
  108.        AND       reg8
  109.        AND       topexpr
  110.  
  111.        BIT       expr ',' '(' DREGHL ')'     TSZ80PLUS
  112.        BIT       expr ',' index              TSZ80PLUS|DRIX
  113.        BIT       expr ',' index              TSZ80PLUS|DRIY
  114.        BIT       expr ',' reg8               TSZ80PLUS
  115.  
  116.        CALL      condition ',' expr          CCSELC
  117.        CALL      condition ',' expr          CCSELM
  118.        CALL      condition ',' expr          CCSELNC
  119.        CALL      condition ',' expr          CCSELNZ
  120.        CALL      condition ',' expr          CCSELP
  121.        CALL      condition ',' expr          CCSELPE
  122.        CALL      condition ',' expr          CCSELPO
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        Opcode   Syntax                       Selection Criteria
  141.  
  142.        CALL      condition ',' expr          CCSELZ
  143.        CALL      expr
  144.  
  145.        CCF
  146.  
  147.        CP        '(' DREGHL ')'
  148.        CP        index                       TSZ80PLUS|DRIX
  149.        CP        index                       TSZ80PLUS|DRIY
  150.        CP        reg8
  151.        CP        topexpr
  152.  
  153.        CPD                                   TSZ80PLUS
  154.  
  155.        CPDR                                  TSZ80PLUS
  156.  
  157.        CPI                                   TSZ80PLUS
  158.  
  159.        CPIR                                  TSZ80PLUS
  160.  
  161.        CPL
  162.  
  163.        DAA
  164.  
  165.        DEC       '(' DREGHL ')'
  166.        DEC       dreg                        DRBC
  167.        DEC       dreg                        DRDE
  168.        DEC       dreg                        DRHL
  169.        DEC       dreg                        DRSP
  170.        DEC       dreg                        TSZ80PLUS|DRIX
  171.        DEC       dreg                        TSZ80PLUS|DRIY
  172.        DEC       index                       TSZ80PLUS|DRIX
  173.        DEC       index                       TSZ80PLUS|DRIY
  174.        DEC       reg8
  175.  
  176.        DI
  177.  
  178.        DJNZ      topexpr
  179.  
  180.        EI
  181.  
  182.        EX        '(' DREGSP ')' ',' dreg     DRHL
  183.        EX        '(' DREGSP ')' ',' dreg     TSZ80PLUS|DRIX
  184.        EX        '(' DREGSP ')' ',' dreg     TSZ80PLUS|DRIY
  185.        EX        dreg ',' dreg               EX1DE|EX2HL
  186.        EX        dreg ',' dreg               TSZ80PLUS|EX1AF|EX2AF
  187.  
  188.        EXX                                   TSZ80PLUS
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        Opcode   Syntax                       Selection Criteria
  207.  
  208.  
  209.        HALT
  210.  
  211.        IM        expr                        TSZ80PLUS|INTSETMODE0
  212.        IM        expr                        TSZ80PLUS|INTSETMODE1
  213.        IM        expr                        TSZ80PLUS|INTSETMODE2
  214.  
  215.        IN0       reg8 ',' '(' topexpr ')'    TS64180
  216.  
  217.        IN        reg8 ',' '(' REGC ')'       TSZ80PLUS
  218.        IN        reg8 ',' '(' topexpr ')'    REGISA
  219.  
  220.        INC       '(' DREGHL ')'
  221.        INC       dreg                        DRBC
  222.        INC       dreg                        DRDE
  223.        INC       dreg                        DRHL
  224.        INC       dreg                        DRSP
  225.        INC       dreg                        TSZ80PLUS|DRIX
  226.        INC       dreg                        TSZ80PLUS|DRIY
  227.        INC       index                       TSZ80PLUS|DRIX
  228.        INC       index                       TSZ80PLUS|DRIY
  229.        INC       reg8
  230.  
  231.        IND                                   TSZ80PLUS
  232.  
  233.        INDR                                  TSZ80PLUS
  234.  
  235.        INI                                   TSZ80PLUS
  236.  
  237.        INIR                                  TSZ80PLUS
  238.  
  239.        JP        '(' dreg ')'                DRHL
  240.        JP        '(' dreg ')'                TSZ80PLUS|DRIX
  241.        JP        '(' dreg ')'                TSZ80PLUS|DRIY
  242.        JP        condition ',' expr          CCSELC
  243.        JP        condition ',' expr          CCSELM
  244.        JP        condition ',' expr          CCSELNC
  245.        JP        condition ',' expr          CCSELNZ
  246.        JP        condition ',' expr          CCSELP
  247.        JP        condition ',' expr          CCSELPE
  248.        JP        condition ',' expr          CCSELPO
  249.        JP        condition ',' expr          CCSELZ
  250.        JP        expr
  251.  
  252.        JR        condition ',' expr          CCSELC|TSZ80PLUS
  253.        JR        condition ',' expr          CCSELNC|TSZ80PLUS
  254.        JR        condition ',' expr          CCSELNZ|TSZ80PLUS
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Opcode   Syntax                       Selection Criteria
  273.  
  274.        JR        condition ',' expr          CCSELZ|TSZ80PLUS
  275.        JR        expr                        TSZ80PLUS
  276.  
  277.        LD        '(' dreg ')' ',' reg8       DRBC|REGISA
  278.        LD        '(' dreg ')' ',' reg8       DRDE|REGISA
  279.        LD        '(' dreg ')' ',' reg8       DRHL
  280.        LD        '(' dreg ')' ',' topexpr    DRHL
  281.        LD        '(' topexpr ')' ',' REGA
  282.        LD        '(' topexpr ')' ',' dreg    DRHL
  283.        LD        '(' topexpr ')' ',' dreg    TSZ80PLUS|DRBC
  284.        LD        '(' topexpr ')' ',' dreg    TSZ80PLUS|DRDE
  285.        LD        '(' topexpr ')' ',' dreg    TSZ80PLUS|DRIX
  286.        LD        '(' topexpr ')' ',' dreg    TSZ80PLUS|DRIY
  287.        LD        '(' topexpr ')' ',' dreg    TSZ80PLUS|DRSP
  288.        LD        dreg ',' '(' topexpr ')'    DRHL
  289.        LD        dreg ',' '(' topexpr ')'    TSZ80PLUS|DRBC
  290.        LD        dreg ',' '(' topexpr ')'    TSZ80PLUS|DRDE
  291.        LD        dreg ',' '(' topexpr ')'    TSZ80PLUS|DRIX
  292.        LD        dreg ',' '(' topexpr ')'    TSZ80PLUS|DRIY
  293.        LD        dreg ',' '(' topexpr ')'    TSZ80PLUS|DRSP
  294.        LD        dreg ',' dreg               TSZ80PLUS|DRHL|DRDESTSP
  295.        LD        dreg ',' dreg               TSZ80PLUS|DRIX|DRDESTSP
  296.        LD        dreg ',' dreg               TSZ80PLUS|DRIY|DRDESTSP
  297.        LD        dreg ',' topexpr            DRBC
  298.        LD        dreg ',' topexpr            DRDE
  299.        LD        dreg ',' topexpr            DRHL
  300.        LD        dreg ',' topexpr            DRSP
  301.        LD        dreg ',' topexpr            TSZ80PLUS|DRIX
  302.        LD        dreg ',' topexpr            TSZ80PLUS|DRIY
  303.        LD        index ',' expr              TSZ80PLUS|DRIX
  304.        LD        index ',' expr              TSZ80PLUS|DRIY
  305.        LD        index ',' reg8              TSZ80PLUS|DRIX
  306.        LD        index ',' reg8              TSZ80PLUS|DRIY
  307.        LD        reg8 ',' '(' dreg ')'       DRBC|REGISA
  308.        LD        reg8 ',' '(' dreg ')'       DRDE|REGISA
  309.        LD        reg8 ',' '(' dreg ')'       DRHL
  310.        LD        reg8 ',' '(' topexpr ')'    REGISA
  311.        LD        reg8 ',' index              TSZ80PLUS|DRIX
  312.        LD        reg8 ',' index              TSZ80PLUS|DRIY
  313.        LD        reg8 ',' reg8
  314.        LD        reg8 ',' specialr           TSZ80PLUS|SPECIALIR|REGISA
  315.        LD        reg8 ',' specialr           TSZ80PLUS|SPECIALRR|REGISA
  316.        LD        reg8 ',' topexpr
  317.        LD        specialr ',' REGA           TSZ80PLUS|SPECIALIR
  318.        LD        specialr ',' REGA           TSZ80PLUS|SPECIALRR
  319.  
  320.        LDD                                   TSZ80PLUS
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.        Opcode   Syntax                       Selection Criteria
  339.  
  340.  
  341.        LDDR                                  TSZ80PLUS
  342.  
  343.        LDI                                   TSZ80PLUS
  344.  
  345.        LDIR                                  TSZ80PLUS
  346.  
  347.        MULT      dreg                        TS64180|DRBC
  348.        MULT      dreg                        TS64180|DRDE
  349.        MULT      dreg                        TS64180|DRHL
  350.        MULT      dreg                        TS64180|DRSP
  351.  
  352.        NEG                                   TSZ80PLUS
  353.  
  354.        NOP
  355.  
  356.        OR        '(' DREGHL ')'
  357.        OR        index                       TSZ80PLUS|DRIX
  358.        OR        index                       TSZ80PLUS|DRIY
  359.        OR        reg8
  360.        OR        topexpr
  361.  
  362.        OTDM                                  TS64180
  363.  
  364.        OTDMR                                 TS64180
  365.  
  366.        OTDR                                  TSZ80PLUS
  367.  
  368.        OTIM                                  TS64180
  369.  
  370.        OTIMR                                 TS64180
  371.  
  372.        OTIR                                  TSZ80PLUS
  373.  
  374.        OUT0      '(' topexpr ')' ',' reg8    TS64180
  375.  
  376.        OUT       '(' REGC ')' ',' reg8       TSZ80PLUS
  377.        OUT       '(' topexpr ')' ',' reg8    REGISA
  378.  
  379.        OUTD                                  TSZ80PLUS
  380.  
  381.        OUTI                                  TSZ80PLUS
  382.  
  383.        POP       dreg                        DRAF
  384.        POP       dreg                        DRBC
  385.        POP       dreg                        DRDE
  386.        POP       dreg                        DRHL
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                   - 7 -
  401.  
  402.  
  403.  
  404.        Opcode   Syntax                       Selection Criteria
  405.  
  406.        POP       dreg                        TSZ80PLUS|DRIX
  407.        POP       dreg                        TSZ80PLUS|DRIY
  408.  
  409.        PUSH      dreg                        DRAF
  410.        PUSH      dreg                        DRBC
  411.        PUSH      dreg                        DRDE
  412.        PUSH      dreg                        DRHL
  413.        PUSH      dreg                        TSZ80PLUS|DRIX
  414.        PUSH      dreg                        TSZ80PLUS|DRIY
  415.  
  416.        RES       expr ',' '(' DREGHL ')'     TSZ80PLUS
  417.        RES       expr ',' index              TSZ80PLUS|DRIX
  418.        RES       expr ',' index              TSZ80PLUS|DRIY
  419.        RES       expr ',' reg8               TSZ80PLUS
  420.  
  421.        RET
  422.        RET       condition                   CCSELC
  423.        RET       condition                   CCSELM
  424.        RET       condition                   CCSELNC
  425.        RET       condition                   CCSELNZ
  426.        RET       condition                   CCSELP
  427.        RET       condition                   CCSELPE
  428.        RET       condition                   CCSELPO
  429.        RET       condition                   CCSELZ
  430.  
  431.        RETI                                  TSZ80PLUS
  432.  
  433.        RETN                                  TSZ80PLUS
  434.  
  435.        RIM                                   CPU8085
  436.  
  437.        RL        '(' DREGHL ')'              TSZ80PLUS
  438.        RL        index                       TSZ80PLUS|DRIX
  439.        RL        index                       TSZ80PLUS|DRIY
  440.        RL        reg8                        TSZ80PLUS
  441.  
  442.        RLA
  443.  
  444.        RLC       '(' DREGHL ')'              TSZ80PLUS
  445.        RLC       index                       TSZ80PLUS|DRIX
  446.        RLC       index                       TSZ80PLUS|DRIY
  447.        RLC       reg8                        TSZ80PLUS
  448.  
  449.        RLCA
  450.  
  451.        RLD                                   TSZ80PLUS
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                                   - 8 -
  467.  
  468.  
  469.  
  470.        Opcode   Syntax                       Selection Criteria
  471.  
  472.        RR        '(' DREGHL ')'              TSZ80PLUS
  473.        RR        index                       TSZ80PLUS|DRIX
  474.        RR        index                       TSZ80PLUS|DRIY
  475.        RR        reg8                        TSZ80PLUS
  476.  
  477.        RRA
  478.  
  479.        RRC       '(' DREGHL ')'              TSZ80PLUS
  480.        RRC       index                       TSZ80PLUS|DRIX
  481.        RRC       index                       TSZ80PLUS|DRIY
  482.        RRC       reg8                        TSZ80PLUS
  483.  
  484.        RRCA
  485.  
  486.        RRD                                   TSZ80PLUS
  487.  
  488.        RST       expr
  489.  
  490.        SBC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRBC
  491.        SBC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRDE
  492.        SBC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRHL
  493.        SBC       dreg ',' dreg               TSZ80PLUS|DRDESTHL|DRSP
  494.        SBC       reg8 ',' '(' DREGHL ')'     REGISA
  495.        SBC       reg8 ',' index              TSZ80PLUS|DRIX|REGISA
  496.        SBC       reg8 ',' index              TSZ80PLUS|DRIY|REGISA
  497.        SBC       reg8 ',' reg8               0|REGISA
  498.        SBC       reg8 ',' topexpr            REGISA
  499.  
  500.        SCF
  501.  
  502.        SET       expr ',' '(' DREGHL ')'     TSZ80PLUS
  503.        SET       expr ',' index              TSZ80PLUS|DRIX
  504.        SET       expr ',' index              TSZ80PLUS|DRIY
  505.        SET       expr ',' reg8               TSZ80PLUS
  506.  
  507.        SIM                                   CPU8085
  508.  
  509.        SLA       '(' DREGHL ')'              TSZ80PLUS
  510.        SLA       index                       TSZ80PLUS|DRIX
  511.        SLA       index                       TSZ80PLUS|DRIY
  512.        SLA       reg8                        TSZ80PLUS
  513.  
  514.        SLP                                   TS64180
  515.  
  516.        SRA       '(' DREGHL ')'              TSZ80PLUS
  517.        SRA       index                       TSZ80PLUS|DRIX
  518.        SRA       index                       TSZ80PLUS|DRIY
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                   - 9 -
  533.  
  534.  
  535.  
  536.        Opcode   Syntax                       Selection Criteria
  537.  
  538.        SRA       reg8                        TSZ80PLUS
  539.  
  540.        SRL       '(' DREGHL ')'              TSZ80PLUS
  541.        SRL       index                       TSZ80PLUS|DRIX
  542.        SRL       index                       TSZ80PLUS|DRIY
  543.        SRL       reg8                        TSZ80PLUS
  544.  
  545.        SUB       '(' DREGHL ')'
  546.        SUB       index                       TSZ80PLUS|DRIX
  547.        SUB       index                       TSZ80PLUS|DRIY
  548.        SUB       reg8
  549.        SUB       topexpr
  550.  
  551.        TST       '(' DREGHL ')'              TS64180
  552.        TST       reg8                        TS64180
  553.        TST       topexpr                     TS64180
  554.  
  555.        TSTIO     topexpr                     TS64180
  556.  
  557.        XOR       '(' DREGHL ')'
  558.        XOR       index                       TSZ80PLUS|DRIX
  559.        XOR       index                       TSZ80PLUS|DRIY
  560.        XOR       reg8
  561.        XOR       topexpr
  562.  
  563.        A.2.2  Selection_Criteria_Keywords
  564.  
  565.             CPU8085             Instruction is only implemented for
  566.                                 the 8085.
  567.  
  568.             TSZ80PLUS           Instruction is implemented in the
  569.                                 z80 and 64180 instruction sets.
  570.  
  571.             TS64180             Instruction is only implemented in
  572.                                 the 64180
  573.  
  574.             DRIX                Instruction refers to the IX index
  575.                                 register
  576.  
  577.             DRIY                Instruction refers to the IY index
  578.                                 register
  579.  
  580.             DRSP                Instruction refers to the Stack
  581.                                 Pointer
  582.  
  583.             DRHL                Instruction refers to the HL
  584.                                 register
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.                                   - 10 -
  599.  
  600.  
  601.  
  602.             DRDE                Instruction refers to the DE
  603.                                 register
  604.  
  605.             DRBC                Instruction refers to the BC
  606.                                 register
  607.  
  608.             DRAF                Instruction refers to the AF
  609.                                 concatenated register
  610.  
  611.             DRDESTSP            Instruction which refers to two
  612.                                 double register operands, uses the
  613.                                 Stack Pointer as the destination.
  614.  
  615.             DRDESTHL            Instruction which refers to two
  616.                                 double register operands, uses the
  617.                                 HL double register as the
  618.                                 destination.
  619.  
  620.             DRDESTIX            Instruction which refers to two
  621.                                 double register operands, uses the
  622.                                 IX index register as the
  623.                                 destination.
  624.  
  625.             DRDESTIY            Instruction which refers to two
  626.                                 double register operands, uses the
  627.                                 IY index register as the
  628.                                 destination.
  629.  
  630.             REGISA              Instruction is restricted to using
  631.                                 the A register for an 8 bit
  632.                                 register operand.
  633.  
  634.             CCSELNZ             Instruction uses NonZero condition.
  635.  
  636.             CCSELZ              Instruction uses Zero condition.
  637.  
  638.             CCSELNC             Instruction uses No Carry
  639.                                 condition.
  640.  
  641.             CCSELC              Instruction uses Carry condition.
  642.  
  643.             CCSELPO             Instruction uses Parity Odd
  644.                                 condition.
  645.  
  646.             CCSELPE             Instruction uses Parity Even
  647.                                 condition.
  648.  
  649.             CCSELP              Instruction uses Plus condition.
  650.  
  651.             CCSELM              Instruction uses Minus condition.
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.                                   - 11 -
  665.  
  666.  
  667.  
  668.             EX1AF               First operand of an Ex instruction
  669.                                 is the AF register.
  670.  
  671.             EX1DE               First operand of an Ex instruction
  672.                                 is the DE register.
  673.  
  674.             EX2AF               Second operand of an Ex instruction
  675.                                 is the AF register.
  676.  
  677.             EX2HL               Second operand of an Ex instruction
  678.                                 is the HL register.
  679.  
  680.             SPECIALIR           Instruction uses the I special
  681.                                 register.
  682.  
  683.             SPECIALRR           Instruction uses the R special
  684.                                 register.
  685.  
  686.        A.2.3  Apostrophes  The apostrophes in the syntax field are
  687.        a notation used for the parser generator and are not put in
  688.        the assembler source statement.
  689.  
  690.        A.3  Notes
  691.  
  692.        A.3.1  Conditions  Conditions are represented by the
  693.        reserved symbols z, nz, nc, pe, po, p, m, and c, and their
  694.        uppercase versions.
  695.  
  696.        A.3.2  Indexed_Addressing  Index addressing uses the format
  697.        "( index register + expression )" where index register is IX
  698.        or IY.
  699.  
  700.        A.3.3  Top_Expressions  The syntax of some of the
  701.        instructions combined with the standard expression syntax
  702.        resulted in confusion whether an operand was an expression
  703.        surrounded by parenthesis, or a memory reference. To get
  704.        around this, the expressions in these ambiguous cases were
  705.        restricted to those forms of expression that don't have
  706.        surrounding parenthesis at the top level.  Subexpressions
  707.        may be parenthesized, but only if an operator seperates or
  708.        precedes the subexpression.
  709.  
  710.             Example
  711.  
  712.             ld a, (47h)     ; load from memory address 0x47
  713.             ld a, +(47h)    ; load immediate value 0x47
  714.             ld a, ((47h))   ; error
  715.  
  716.        A.3.4  dreg,_reg8,_specialr  Double registers (dreg) are the
  717.        set of symbols af, bc, de, hl, ix, iy, and sp and their
  718.        uppercase versions.
  719.  
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.                                   - 12 -
  731.  
  732.  
  733.  
  734.        Eight bit registers (reg8) are the set of symbols a, b, c,
  735.        d, e, h, l, and their uppercase versions.
  736.  
  737.        Special registers are i, r, I, R.
  738.  
  739.        A.3.5  Bit_Numbers  The bit number expression in the BIT,
  740.        RES, and SET operations has to have value defined when the
  741.        instruction is read in the first pass.  The value must be
  742.        between 0 and 7.
  743.  
  744.        A.3.6  Reserved_Symbols
  745.  
  746.        A.3.6.1  Machine_Dependent_Reserved_Symbols  A AF B BC C D
  747.        DE E H HL I IX IY L M NC NZ P PE PO R SP Z a af b bc c d de
  748.        e h hl i ix iy l m nc nz p pe po r sp z
  749.  
  750.        A.3.6.2  Standard_Reserved_Symbols  AND DEFINED EQ GE GT
  751.        HIGH LE LOW LT MOD NE NOT OR SHL SHR XOR and defined eq ge
  752.        gt high le low lt mod ne not or shl shr xor
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.                                  CONTENTS
  801.  
  802.  
  803.        A.  Appendix for asz80 Frankenstein Assembler...........   1
  804.            A.1  Pseudo Operations..............................   1
  805.            A.2  Instructions...................................   1
  806.            A.3  Notes..........................................  11
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.                                   - i -
  855.  
  856.  
  857.  
  858.  
  859.